<template>
    <div>
        <comp ref="bar" :params="params" height="300px" width="100%" />
    </div>
</template>
<script>
import comp from "./../bar/index";
export default {
    name: "test",
    title: "叠加柱子",
    components: { comp },
    theme: "black",
    data() {
        return {
            params:{},
            dataCols: {
                dimension: ["日期"],
                legend: {
                    data: ["类型1", "类型2", "类型3"],
                },
                series: [
                    {
                        日期: "1-1",
                        类型1: 10,
                        类型2: "20",
                        类型3: "40",
                    },
                    {
                        日期: "1-2",
                        类型1: 11,
                        类型2: "21",
                        类型3: "41",
                    },
                    {
                        日期: "1-3",
                        类型1: 12,
                        类型2: "22",
                        类型3: "42",
                    },
                    {
                        日期: "1-4",
                        类型1: 13,
                        类型2: "23",
                        类型3: "43",
                    },
                    {
                        日期: "1-5",
                        类型1: 90,
                        类型2: "24",
                        类型3: "44",
                    },
                    {
                        日期: "1-6",
                        类型1: 13,
                        类型2: "23",
                        类型3: "43",
                    },
                    {
                        日期: "1-7",
                        类型1: 90,
                        类型2: "24",
                        类型3: "44",
                    },
                    {
                        日期: "1-8",
                        类型1: 90,
                        类型2: "24",
                        类型3: "44",
                    },
                    {
                        日期: "1-9",
                        类型1: 90,
                        类型2: "24",
                        类型3: "44",
                    },
                ],
            },
            setting: {
                dimension: ["日期"],
                grid: {},
                legend: {},
                xAxis: {
                    axisLine: {
                        show: false,
                    },
                    axisLabel: {
                        rotate: "45",
                    },
                },
                series: {
                    stack: {
                        类型1: "1",
                        类型2: "1",
                        类型3: "3",
                     
                    },
                    barWidth: 12,
                },
                color: [],
            },
        };
    },
    mounted() {
        this.$nextTick(() => {
            let param = {
                dataCols: this.dataCols,
                setting: this.setting,
            };
            this.params={...param};
            //this.$refs.bar.initChart(param);
        });
    },
};
</script>